package com.hqq.action.clazz.responsibility;

/**
 * MyHandler
 * Created by heqianqian on 2017/3/11.
 */
public class MyHandler extends AbstactHandler implements Handler{

    private String name;

    public MyHandler(String name) {
        this.name = name;
    }

    @Override
    public void operation() {
        System.out.println("name:"+name);
        if (getHandler()!=null){
            getHandler().operation();
        }
    }
}
